package com.pinxixi.goods.service;

import com.pinxixi.framework.domain.goods.Item;
import com.pinxixi.framework.model.response.CommonCode;
import com.pinxixi.framework.model.response.ListResponseResult;
import com.pinxixi.framework.model.response.QueryResult;
import com.pinxixi.goods.mapper.ItemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ItemService {

    @Autowired
    private ItemMapper itemMappeer;

    public ListResponseResult<Item> findAllItem() {
        List<Item> list = itemMappeer.findAll();
        QueryResult queryResult = new QueryResult();
        queryResult.setList(list);
        return new ListResponseResult<Item>(CommonCode.SUCCESS,queryResult);
    }
}
